const mongoose = require("mongoose");
const {Schema} = require("mongoose");
let schema = mongoose.Schema;
let visitorSchema = new schema({
    // 存用户id
    visitor:{
        type:Schema.Types.ObjectId,
        required:true,
        ref:'user'
    },
    // 日期
    date:{
        type:Number,
        default:Date.now
    }
});

module.exports = mongoose.model('visitor', visitorSchema);